package top.tangyh.lamp.care.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;

import java.beans.Transient;
import java.time.LocalDateTime;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import static com.baomidou.mybatisplus.annotation.SqlCondition.EQUAL;
import static top.tangyh.lamp.model.constant.Condition.LIKE;
import top.tangyh.basic.base.entity.Entity;


/**
 * <p>
 * 实体类
 * 导管使用记录具体信息表
 * </p>
 *
 * @author zqb
 * @date 2024-07-19 15:02:24
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString(callSuper = true)
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@Builder
@TableName("b_pipe_use_record")
public class BPipeUseRecord extends Entity<Long> {
    private static final long serialVersionUID = 1L;

    /**
     * 导管类型code
     */
    @TableField(value = "pp_type_id", condition = LIKE)
    @Schema(description = "导管类型code")
    private String ppTypeId;
    /**
     * 病人健康号
     */
    @TableField(value = "patient_ident", condition = LIKE)
    @Schema(description = "病人健康号")
    private String patientIdent;
    /**
     * 状态(1、使用中  2、已拔管)
     */
    @TableField(value = "state", condition = EQUAL)
    @Schema(description = "状态(1、使用中  2、已拔管)")
    private Integer state;
    /**
     * json数据
     */
    @TableField(value = "json_data", condition = LIKE)
    @Schema(description = "json数据")
    private String jsonData;
    /**
     * 管道名称
     */
    @TableField(value = "pp_name", condition = LIKE)
    @Schema(description = "管道名称")
    private String ppName;
    /**
     * 管道名称
     */
    @TableField(value = "pp_name_code", condition = LIKE)
    @Schema(description = "管道名称code")
    private String ppNameCode;
    /**
     * 置管人
     */
    @TableField(value = "user_id", condition = LIKE)
    @Schema(description = "置管人")
    private String userId;
    /**
     * 有效期（使用天数）
     */
    @TableField(value = "validity", condition = EQUAL)
    @Schema(description = "有效期（使用天数）")
    private Integer validity;
    /**
     * 拔管code
     */
    @TableField(value = "reason_code", condition = LIKE)
    @Schema(description = "拔管code")
    private String reasonCode;
    /**
     * 拔管原因
     */
    @TableField(value = "reason_name", condition = LIKE)
    @Schema(description = "拔管原因")
    private String reasonName;
    /**
     * 是否非计划性拔管1、是  0、否
     */
    @TableField(value = "is_plan", condition = EQUAL)
    @Schema(description = "是否非计划性拔管1、是  0、否")
    private Integer isPlan;
    /**
     * 拔管人
     */
    @TableField(value = "pull_user_id", condition = LIKE)
    @Schema(description = "拔管人")
    private String pullUserId;
    /**
     * 换管人
     */
    @TableField(value = "change_user_id", condition = LIKE)
    @Schema(description = "换管人")
    private String changeUserId;
    /**
     * 换管地点
     */
    @TableField(value = "change_place_name", condition = LIKE)
    @Schema(description = "换管地点")
    private String changePlaceName;
    /**
     * 拔管时间
     */
    @TableField(value = "pull_time", condition = EQUAL)
    @Schema(description = "拔管时间")
    private LocalDateTime pullTime;

    /**
     * 换管时间
     */
    @TableField(value = "change_time", condition = EQUAL)
    @Schema(description = "换管时间")
    private LocalDateTime changeTime;
    /**
     * 置入日期
     */
    @TableField(value = "imbed_time", condition = EQUAL)
    @Schema(description = "置入日期")
    private LocalDateTime imbedTime;
    /**
     * 置管人名字
     */
    @TableField(value = "user_name", condition = LIKE)
    @Schema(description = "置管人名字")
    private String userName;
    /**
     * 拔管人名字
     */
    @TableField(value = "pull_user_name", condition = LIKE)
    @Schema(description = "拔管人名字")
    private String pullUserName;
    /**
     * 换管人名字
     */
    @TableField(value = "change_user_name", condition = LIKE)
    @Schema(description = "换管人名字")
    private String changeUserName;
    /**
     * 插管地点
     */
    @TableField(value = "intubation_name", condition = LIKE)
    @Schema(description = "插管地点")
    private String intubationName;
    /**
     * 插管code
     */
    @TableField(value = "intubation_code", condition = LIKE)
    @Schema(description = "插管code")
    private String intubationCode;
    /**
     * 插管时间
     */
    @TableField(value = "intubation_time", condition = EQUAL)
    @Schema(description = "插管时间")
    private LocalDateTime intubationTime;
    /**
     *  型号code
     */
    @TableField(value = "type_code", condition = LIKE)
    @Schema(description = "型号code")
    private String typeCode;
    /**
     * 型号名称
     */
    @TableField(value = "type_name", condition = LIKE)
    @Schema(description = "型号名称")
    private String typeName;
    /**
     * 插管部位名称
     */
    @TableField(value = "intubation_site_name", condition = LIKE)
    @Schema(description = "插管部位名称")
    private String intubationSiteName;
    /**
     * 插管部位code
     */
    @TableField(value = "intubation_site_code", condition = LIKE)
    @Schema(description = "插管部位code")
    private String intubationSiteCode;
    /**
     * 换管地点code
     */
    @TableField(value = "change_place_code", condition = LIKE)
    @Schema(description = "换管地点code")
    private String changePlaceCode;
    /**
     * 住院号
     */
    @TableField(value = "hospital_number", condition = LIKE)
    @Schema(description = "住院号")
    private String hospitalNumber;

    /**
     * 病人姓名
     */
    @TableField(value = "patient_name", condition = LIKE)
    @Schema(description = "病人姓名")
    private String patientName;
    /**
     * 管道类型名称（高危，中危，低危）
     */
    @TableField(value = "pp_type_name", condition = LIKE)
    @Schema(description = "管道类型名称（高危，中危，低危）")
    private String ppTypeName;

    @Schema(description ="剩余天数")
    @TableField(exist = false)
    private Integer days;

    @Schema(description = "床位号")
    private String bedNumber;
    @Schema(description = "科室")
    private String department;
}
